// source --> http://www.raws-hk.com/wordpress/wp-includes/js/jquery/jquery.min.js?ver=3.5.1 /*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 http://www.raws-hk.com/wordpress/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.3.2 /*! jQuery Migrate v3.3.2 | (c) OpenJS Foundation and other contributors | jquery.org/license */ "undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],i=1;i<=3;i++){if(+o[i]<+n[i])return 1;if(+n[i]<+o[i])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.3.2",n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var r={};function u(e){var t=n.console;s.migrateDeduplicateWarnings&&r[e]||(r[e]=!0,s.migrateWarnings.push(e),t&&t.warn&&!s.migrateMute&&(t.warn("JQMIGRATE: "+e),s.migrateTrace&&t.trace&&t.trace()))}function t(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n),r},set:function(e){u(n),r=e}})}function o(e,t,r,n){e[t]=function(){return u(n),r.apply(this,arguments)}}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){r={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("jQuery is not compatible with Quirks Mode");var i,a,c,d={},l=s.fn.init,p=s.find,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,y=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,m=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;for(i in s.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(u("jQuery( '#' ) is not a valid selector"),t[0]=[]),l.apply(this,t)},s.fn.init.prototype=s.fn,s.find=function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&f.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(y,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("Attribute selector with '#' was not fixed: "+r[0])}}return p.apply(this,r)},p)Object.prototype.hasOwnProperty.call(p,i)&&(s.find[i]=p[i]);o(s.fn,"size",function(){return this.length},"jQuery.fn.size() is deprecated and removed; use the .length property"),o(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"jQuery.parseJSON is deprecated; use JSON.parse"),o(s,"holdReady",s.holdReady,"jQuery.holdReady is deprecated"),o(s,"unique",s.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),t(s.expr,"filters",s.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),t(s.expr,":",s.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&o(s,"trim",function(e){return null==e?"":(e+"").replace(m,"")},"jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(o(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"jQuery.nodeName is deprecated"),o(s,"isArray",Array.isArray,"jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(o(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){d["[object "+t+"]"]=t.toLowerCase()}),o(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[Object.prototype.toString.call(e)]||"object":typeof e},"jQuery.type is deprecated"),o(s,"isFunction",function(e){return"function"==typeof e},"jQuery.isFunction() is deprecated"),o(s,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated")),s.ajax&&(a=s.ajax,c=/(=)\?(?=&|$)|\?\?/,s.ajax=function(){var e=a.apply(this,arguments);return e.promise&&(o(e,"success",e.done,"jQXHR.success is deprecated and removed"),o(e,"error",e.fail,"jQXHR.error is deprecated and removed"),o(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e},e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(c.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&c.test(e.data))&&u("JSON-to-JSONP auto-promotion is deprecated")}));var g=s.fn.removeAttr,h=s.fn.toggleClass,v=/\S+/g;function j(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}s.fn.removeAttr=function(e){var r=this;return s.each(e.match(v),function(e,t){s.expr.match.bool.test(t)&&(u("jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),g.apply(this,arguments)};var Q,b=!(s.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?h.apply(this,arguments):(u("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))}),w=/^[a-z]/,x=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return b=!0,e=r.apply(this,arguments),b=!1,e})}),s.swap=function(e,t,r,n){var o,i,a={};for(i in b||u("jQuery.swap() is undocumented and deprecated"),t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=r.apply(e,n||[]),t)e.style[i]=a[i];return o},e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("JQMIGRATE: jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),s.cssNumber||(s.cssNumber={}),Q=s.fn.css,s.fn.css=function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=j(e),n=r,w.test(n)&&x.test(n[0].toUpperCase()+n.slice(1))||s.cssNumber[r]||u('Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))};var A,k,S,M,N=s.data;s.data=function(e,t,r){var n,o,i;if(t&&"object"==typeof t&&2===arguments.length){for(i in n=s.hasData(e)&&N.call(this,e),o={},t)i!==j(i)?(u("jQuery.data() always sets/gets camelCased names: "+i),n[i]=t[i]):o[i]=t[i];return N.call(this,e,o),t}return t&&"string"==typeof t&&t!==j(t)&&(n=s.hasData(e)&&N.call(this,e))&&t in n?(u("jQuery.data() always sets/gets camelCased names: "+t),2");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s}); // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/js/jquery.waypoints.js?ver=2.0.5 // Generated by CoffeeScript 1.6.2 /*! Waypoints - v2.0.5 Copyright (c) 2011-2014 Caleb Troughton Licensed under the MIT license. https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt */ (function() { var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, __slice = [].slice; (function(root, factory) { if (typeof define === 'function' && define.amd) { return define('waypoints', ['jquery'], function($) { return factory($, root); }); } else { return factory(root.jQuery, root); } })(window, function($, window) { var $w, Context, Waypoint, allWaypoints, contextCounter, contextKey, contexts, isTouch, jQMethods, methods, resizeEvent, scrollEvent, waypointCounter, waypointKey, wp, wps; $w = $(window); isTouch = __indexOf.call(window, 'ontouchstart') >= 0; allWaypoints = { horizontal: {}, vertical: {} }; contextCounter = 1; contexts = {}; contextKey = 'waypoints-context-id'; resizeEvent = 'resize.waypoints'; scrollEvent = 'scroll.waypoints'; waypointCounter = 1; waypointKey = 'waypoints-waypoint-ids'; wp = 'waypoint'; wps = 'waypoints'; Context = (function() { function Context($element) { var _this = this; this.$element = $element; this.element = $element[0]; this.didResize = false; this.didScroll = false; this.id = 'context' + contextCounter++; this.oldScroll = { x: $element.scrollLeft(), y: $element.scrollTop() }; this.waypoints = { horizontal: {}, vertical: {} }; this.element[contextKey] = this.id; contexts[this.id] = this; $element.bind(scrollEvent, function() { var scrollHandler; if (!(_this.didScroll || isTouch)) { _this.didScroll = true; scrollHandler = function() { _this.doScroll(); return _this.didScroll = false; }; return window.setTimeout(scrollHandler, $[wps].settings.scrollThrottle); } }); $element.bind(resizeEvent, function() { var resizeHandler; if (!_this.didResize) { _this.didResize = true; resizeHandler = function() { $[wps]('refresh'); return _this.didResize = false; }; return window.setTimeout(resizeHandler, $[wps].settings.resizeThrottle); } }); } Context.prototype.doScroll = function() { var axes, _this = this; axes = { horizontal: { newScroll: this.$element.scrollLeft(), oldScroll: this.oldScroll.x, forward: 'right', backward: 'left' }, vertical: { newScroll: this.$element.scrollTop(), oldScroll: this.oldScroll.y, forward: 'down', backward: 'up' } }; if (isTouch && (!axes.vertical.oldScroll || !axes.vertical.newScroll)) { $[wps]('refresh'); } $.each(axes, function(aKey, axis) { var direction, isForward, triggered; triggered = []; isForward = axis.newScroll > axis.oldScroll; direction = isForward ? axis.forward : axis.backward; $.each(_this.waypoints[aKey], function(wKey, waypoint) { var _ref, _ref1; if ((axis.oldScroll < (_ref = waypoint.offset) && _ref <= axis.newScroll)) { return triggered.push(waypoint); } else if ((axis.newScroll < (_ref1 = waypoint.offset) && _ref1 <= axis.oldScroll)) { return triggered.push(waypoint); } }); triggered.sort(function(a, b) { return a.offset - b.offset; }); if (!isForward) { triggered.reverse(); } return $.each(triggered, function(i, waypoint) { if (waypoint.options.continuous || i === triggered.length - 1) { return waypoint.trigger([direction]); } }); }); return this.oldScroll = { x: axes.horizontal.newScroll, y: axes.vertical.newScroll }; }; Context.prototype.refresh = function() { var axes, cOffset, isWin, _this = this; isWin = $.isWindow(this.element); cOffset = this.$element.offset(); this.doScroll(); axes = { horizontal: { contextOffset: isWin ? 0 : cOffset.left, contextScroll: isWin ? 0 : this.oldScroll.x, contextDimension: this.$element.width(), oldScroll: this.oldScroll.x, forward: 'right', backward: 'left', offsetProp: 'left' }, vertical: { contextOffset: isWin ? 0 : cOffset.top, contextScroll: isWin ? 0 : this.oldScroll.y, contextDimension: isWin ? $[wps]('viewportHeight') : this.$element.height(), oldScroll: this.oldScroll.y, forward: 'down', backward: 'up', offsetProp: 'top' } }; return $.each(axes, function(aKey, axis) { return $.each(_this.waypoints[aKey], function(i, waypoint) { var adjustment, elementOffset, oldOffset, _ref, _ref1; adjustment = waypoint.options.offset; oldOffset = waypoint.offset; elementOffset = $.isWindow(waypoint.element) ? 0 : waypoint.$element.offset()[axis.offsetProp]; if ($.isFunction(adjustment)) { adjustment = adjustment.apply(waypoint.element); } else if (typeof adjustment === 'string') { adjustment = parseFloat(adjustment); if (waypoint.options.offset.indexOf('%') > -1) { adjustment = Math.ceil(axis.contextDimension * adjustment / 100); } } waypoint.offset = elementOffset - axis.contextOffset + axis.contextScroll - adjustment; if ((waypoint.options.onlyOnScroll && (oldOffset != null)) || !waypoint.enabled) { return; } if (oldOffset !== null && (oldOffset < (_ref = axis.oldScroll) && _ref <= waypoint.offset)) { return waypoint.trigger([axis.backward]); } else if (oldOffset !== null && (oldOffset > (_ref1 = axis.oldScroll) && _ref1 >= waypoint.offset)) { return waypoint.trigger([axis.forward]); } else if (oldOffset === null && axis.oldScroll >= waypoint.offset) { return waypoint.trigger([axis.forward]); } }); }); }; Context.prototype.checkEmpty = function() { if ($.isEmptyObject(this.waypoints.horizontal) && $.isEmptyObject(this.waypoints.vertical)) { this.$element.unbind([resizeEvent, scrollEvent].join(' ')); return delete contexts[this.id]; } }; return Context; })(); Waypoint = (function() { function Waypoint($element, context, options) { var idList, _ref; if (options.offset === 'bottom-in-view') { options.offset = function() { var contextHeight; contextHeight = $[wps]('viewportHeight'); if (!$.isWindow(context.element)) { contextHeight = context.$element.height(); } return contextHeight - $(this).outerHeight(); }; } this.$element = $element; this.element = $element[0]; this.axis = options.horizontal ? 'horizontal' : 'vertical'; this.callback = options.handler; this.context = context; this.enabled = options.enabled; this.id = 'waypoints' + waypointCounter++; this.offset = null; this.options = options; context.waypoints[this.axis][this.id] = this; allWaypoints[this.axis][this.id] = this; idList = (_ref = this.element[waypointKey]) != null ? _ref : []; idList.push(this.id); this.element[waypointKey] = idList; } Waypoint.prototype.trigger = function(args) { if (!this.enabled) { return; } if (this.callback != null) { this.callback.apply(this.element, args); } if (this.options.triggerOnce) { return this.destroy(); } }; Waypoint.prototype.disable = function() { return this.enabled = false; }; Waypoint.prototype.enable = function() { this.context.refresh(); return this.enabled = true; }; Waypoint.prototype.destroy = function() { delete allWaypoints[this.axis][this.id]; delete this.context.waypoints[this.axis][this.id]; return this.context.checkEmpty(); }; Waypoint.getWaypointsByElement = function(element) { var all, ids; ids = element[waypointKey]; if (!ids) { return []; } all = $.extend({}, allWaypoints.horizontal, allWaypoints.vertical); return $.map(ids, function(id) { return all[id]; }); }; return Waypoint; })(); methods = { init: function(f, options) { var _ref; options = $.extend({}, $.fn[wp].defaults, options); if ((_ref = options.handler) == null) { options.handler = f; } this.each(function() { var $this, context, contextElement, _ref1; $this = $(this); contextElement = (_ref1 = options.context) != null ? _ref1 : $.fn[wp].defaults.context; if (!$.isWindow(contextElement)) { contextElement = $this.closest(contextElement); } contextElement = $(contextElement); context = contexts[contextElement[0][contextKey]]; if (!context) { context = new Context(contextElement); } return new Waypoint($this, context, options); }); $[wps]('refresh'); return this; }, disable: function() { return methods._invoke.call(this, 'disable'); }, enable: function() { return methods._invoke.call(this, 'enable'); }, destroy: function() { return methods._invoke.call(this, 'destroy'); }, prev: function(axis, selector) { return methods._traverse.call(this, axis, selector, function(stack, index, waypoints) { if (index > 0) { return stack.push(waypoints[index - 1]); } }); }, next: function(axis, selector) { return methods._traverse.call(this, axis, selector, function(stack, index, waypoints) { if (index < waypoints.length - 1) { return stack.push(waypoints[index + 1]); } }); }, _traverse: function(axis, selector, push) { var stack, waypoints; if (axis == null) { axis = 'vertical'; } if (selector == null) { selector = window; } waypoints = jQMethods.aggregate(selector); stack = []; this.each(function() { var index; index = $.inArray(this, waypoints[axis]); return push(stack, index, waypoints[axis]); }); return this.pushStack(stack); }, _invoke: function(method) { this.each(function() { var waypoints; waypoints = Waypoint.getWaypointsByElement(this); return $.each(waypoints, function(i, waypoint) { waypoint[method](); return true; }); }); return this; } }; $.fn[wp] = function() { var args, method; method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; if (methods[method]) { return methods[method].apply(this, args); } else if ($.isFunction(method)) { return methods.init.apply(this, arguments); } else if ($.isPlainObject(method)) { return methods.init.apply(this, [null, method]); } else if (!method) { return $.error("jQuery Waypoints needs a callback function or handler option."); } else { return $.error("The " + method + " method does not exist in jQuery Waypoints."); } }; $.fn[wp].defaults = { context: window, continuous: true, enabled: true, horizontal: false, offset: 0, triggerOnce: false }; jQMethods = { refresh: function() { return $.each(contexts, function(i, context) { return context.refresh(); }); }, viewportHeight: function() { var _ref; return (_ref = window.innerHeight) != null ? _ref : $w.height(); }, aggregate: function(contextSelector) { var collection, waypoints, _ref; collection = allWaypoints; if (contextSelector) { collection = (_ref = contexts[$(contextSelector)[0][contextKey]]) != null ? _ref.waypoints : void 0; } if (!collection) { return []; } waypoints = { horizontal: [], vertical: [] }; $.each(waypoints, function(axis, arr) { $.each(collection[axis], function(key, waypoint) { return arr.push(waypoint); }); arr.sort(function(a, b) { return a.offset - b.offset; }); waypoints[axis] = $.map(arr, function(waypoint) { return waypoint.element; }); return waypoints[axis] = $.unique(waypoints[axis]); }); return waypoints; }, above: function(contextSelector) { if (contextSelector == null) { contextSelector = window; } return jQMethods._filter(contextSelector, 'vertical', function(context, waypoint) { return waypoint.offset <= context.oldScroll.y; }); }, below: function(contextSelector) { if (contextSelector == null) { contextSelector = window; } return jQMethods._filter(contextSelector, 'vertical', function(context, waypoint) { return waypoint.offset > context.oldScroll.y; }); }, left: function(contextSelector) { if (contextSelector == null) { contextSelector = window; } return jQMethods._filter(contextSelector, 'horizontal', function(context, waypoint) { return waypoint.offset <= context.oldScroll.x; }); }, right: function(contextSelector) { if (contextSelector == null) { contextSelector = window; } return jQMethods._filter(contextSelector, 'horizontal', function(context, waypoint) { return waypoint.offset > context.oldScroll.x; }); }, enable: function() { return jQMethods._invoke('enable'); }, disable: function() { return jQMethods._invoke('disable'); }, destroy: function() { return jQMethods._invoke('destroy'); }, extendFn: function(methodName, f) { return methods[methodName] = f; }, _invoke: function(method) { var waypoints; waypoints = $.extend({}, allWaypoints.vertical, allWaypoints.horizontal); return $.each(waypoints, function(key, waypoint) { waypoint[method](); return true; }); }, _filter: function(selector, axis, test) { var context, waypoints; context = contexts[$(selector)[0][contextKey]]; if (!context) { return []; } waypoints = []; $.each(context.waypoints[axis], function(i, waypoint) { if (test(context, waypoint)) { return waypoints.push(waypoint); } }); waypoints.sort(function(a, b) { return a.offset - b.offset; }); return $.map(waypoints, function(waypoint) { return waypoint.element; }); } }; $[wps] = function() { var args, method; method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; if (jQMethods[method]) { return jQMethods[method].apply(null, args); } else { return jQMethods.aggregate.call(null, method); } }; $[wps].settings = { resizeThrottle: 100, scrollThrottle: 30 }; return $w.on('load.waypoints', function() { return $[wps]('refresh'); }); }); }).call(this); // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/jquery-countdown/jquery.countdown.min.js?ver=2.0.4 /*! * The Final Countdown for jQuery v2.0.4 (http://hilios.github.io/jQuery.countdown/) * Copyright (c) 2014 Edson Hilios * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){return function(b){var c=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(c)for(var e=0,f=c.length;f>e;++e){var g=c[e].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),i=new RegExp(g[0]),j=g[1]||"",k=g[3]||"",l=null;g=g[2],h.hasOwnProperty(g)&&(l=h[g],l=Number(a[l])),null!==l&&("!"===j&&(l=d(k,l)),""===j&&10>l&&(l="0"+l.toString()),b=b.replace(i,l.toString()))}return b=b.replace(/%%/,"%")}}function d(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),1===Math.abs(b)?d:c}var e=100,f=[],g=[];g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var h={Y:"years",m:"months",w:"weeks",d:"days",D:"totalDays",H:"hours",M:"minutes",S:"seconds"},i=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)),this.setFinalDate(c),this.start()};a.extend(i.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},e)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},pause:function(){this.stop.call(this)},resume:function(){this.start.call(this)},remove:function(){this.stop(),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){return 0===this.$el.closest("html").length?void this.remove():(this.totalSecsLeft=this.finalDate.getTime()-(new Date).getTime(),this.totalSecsLeft=Math.ceil(this.totalSecsLeft/1e3),this.totalSecsLeft=this.totalSecsLeft<0?0:this.totalSecsLeft,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,totalDays:Math.floor(this.totalSecsLeft/60/60/24),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),months:Math.floor(this.totalSecsLeft/60/60/24/30),years:Math.floor(this.totalSecsLeft/60/60/24/365)},void(0===this.totalSecsLeft?(this.stop(),this.dispatchEvent("finish")):this.dispatchEvent("update")))},dispatchEvent:function(b){var d=a.Event(b+".countdown");d.finalDate=this.finalDate,d.offset=a.extend({},this.offset),d.strftime=c(this.offset),this.$el.trigger(d)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];i.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new i(this,b[0],b[1])})}}); // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/jquery-easy-pie-chart/jquery.easypiechart.min.js?ver=2.1.7 /**! * easy-pie-chart * Lightweight plugin to render simple, animated and retina optimized pie charts * * @license * @author Robert Fleischmann (http://robert-fleischmann.de) * @version 2.1.7 **/ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"object"==typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(a,b){},onStep:function(a,b,c){},onStop:function(a,b){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));"string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?e.easing=jQuery.easing[e.easing]:e.easing=d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}}); // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/js/jquery.prettyPhoto.js?ver=3.1.6 /* ------------------------------------------------------------------------ Class: prettyPhoto Use: Lightbox clone for jQuery Author: Stephane Caron (http://www.no-margin-for-errors.com) Version: 3.1.6 ------------------------------------------------------------------------- */ (function($) { $.prettyPhoto = {version: '3.1.6'}; $.fn.prettyPhoto = function(pp_settings) { pp_settings = jQuery.extend({ hook: 'rel', /* the attribute tag to use for prettyPhoto hooks. default: 'rel'. For HTML5, use "data-rel" or similar. */ animation_speed: 'fast', /* fast/slow/normal */ ajaxcallback: function() {}, slideshow: 5000, /* false OR interval time in ms */ autoplay_slideshow: false, /* true/false */ opacity: 0.80, /* Value between 0 and 1 */ show_title: true, /* true/false */ allow_resize: true, /* Resize the photos bigger than viewport. true/false */ allow_expand: true, /* Allow the user to expand a resized image. true/false */ default_width: 500, default_height: 344, counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */ horizontal_padding: 20, /* The padding on each side of the picture */ hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ wmode: 'opaque', /* Set the flash wmode attribute */ autoplay: true, /* Automatically start videos: True/False */ modal: false, /* If set to true, only the close button will close the window */ deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */ overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */ overlay_gallery_max: 30, /* Maximum number of pictures in the overlay gallery */ keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */ changepicturecallback: function(){}, /* Called everytime an item is shown/changed */ callback: function(){}, /* Called when prettyPhoto is closed */ ie6_fallback: true, markup: '
\
 
\
\
\
\
\
\
\
\
\
\
\
\ Expand \
\ next \ previous \
\
\
\
\ Previous \

0/0

\ Next \
\

\
{pp_social}
\ Close \
\
\
\
\
\
\
\
\
\
\
\
\
', gallery_markup: '', image_markup: '', flash_markup: '', quicktime_markup: '', iframe_markup: '', inline_markup: '
{content}
', custom_markup: '', social_tools: '' /* html or false to disable */ }, pp_settings); // Global variables accessible only by prettyPhoto var matchedObjects = this, percentBased = false, pp_dimensions, pp_open, // prettyPhoto container specific pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth, // Window size windowHeight = $(window).height(), windowWidth = $(window).width(), // Global elements pp_slideshow; doresize = true, scroll_pos = _get_scroll(); // Window/Keyboard events $(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){ _center_overlay(); _resize_overlay(); }); if(pp_settings.keyboard_shortcuts) { $(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){ if(typeof $pp_pic_holder != 'undefined'){ if($pp_pic_holder.is(':visible')){ switch(e.keyCode){ case 37: $.prettyPhoto.changePage('previous'); e.preventDefault(); break; case 39: $.prettyPhoto.changePage('next'); e.preventDefault(); break; case 27: if(!settings.modal) $.prettyPhoto.close(); e.preventDefault(); break; }; // return false; }; }; }); }; /** * Initialize prettyPhoto. */ $.prettyPhoto.initialize = function() { settings = pp_settings; if(settings.theme == 'pp_default') settings.horizontal_padding = 16; // Find out if the picture is part of a set theRel = $(this).attr(settings.hook); galleryRegExp = /\[(?:.*)\]/; isSet = (galleryRegExp.exec(theRel)) ? true : false; // Put the SRCs, TITLEs, ALTs into an array. pp_images = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return $(n).attr('href'); }) : $.makeArray($(this).attr('href')); pp_titles = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(this).find('img').attr('alt')); pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; }) : $.makeArray($(this).attr('title')); if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false; set_position = jQuery.inArray($(this).attr('href'), pp_images); // Define where in the array the clicked item is positionned rel_index = (isSet) ? set_position : $("a["+settings.hook+"^='"+theRel+"']").index($(this)); _build_overlay(this); // Build the overlay {this} being the caller if(settings.allow_resize) $(window).bind('scroll.prettyphoto',function(){ _center_overlay(); }); $.prettyPhoto.open(); return false; } /** * Opens the prettyPhoto modal box. * @param image {String,Array} Full path to the image to be open, can also be an array containing full images paths. * @param title {String,Array} The title to be displayed with the picture, can also be an array containing all the titles. * @param description {String,Array} The description to be displayed with the picture, can also be an array containing all the descriptions. */ $.prettyPhoto.open = function(event) { if(typeof settings == "undefined"){ // Means it's an API call, need to manually get the settings and set the variables settings = pp_settings; pp_images = $.makeArray(arguments[0]); pp_titles = (arguments[1]) ? $.makeArray(arguments[1]) : $.makeArray(""); pp_descriptions = (arguments[2]) ? $.makeArray(arguments[2]) : $.makeArray(""); isSet = (pp_images.length > 1) ? true : false; set_position = (arguments[3])? arguments[3]: 0; _build_overlay(event.target); // Build the overlay {this} being the caller } if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden'); // Hide the flash _checkPosition($(pp_images).size()); // Hide the next/previous links if on first or last images. $('.pp_loaderIcon').show(); if(settings.deeplinking) setHashtag(); // Rebuild Facebook Like Button with updated href if(settings.social_tools){ facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href)); $pp_pic_holder.find('.pp_social').html(facebook_like_link); } // Fade the content in if($ppt.is(':hidden')) $ppt.css('opacity',0).show(); $pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity); // Display the current position $pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).size()); // Set the description if(typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != ""){ $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position])); }else{ $pp_pic_holder.find('.pp_description').hide(); } // Get the dimensions movie_width = ( parseFloat(getParam('width',pp_images[set_position])) ) ? getParam('width',pp_images[set_position]) : settings.default_width.toString(); movie_height = ( parseFloat(getParam('height',pp_images[set_position])) ) ? getParam('height',pp_images[set_position]) : settings.default_height.toString(); // If the size is % based, calculate according to window dimensions percentBased=false; if(movie_height.indexOf('%') != -1) { movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); percentBased = true; } if(movie_width.indexOf('%') != -1) { movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); percentBased = true; } // Fade the holder $pp_pic_holder.fadeIn(function(){ // Set the title (settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined") ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html(' '); imgPreloader = ""; skipInjection = false; // Inject the proper content switch(_getFileType(pp_images[set_position])){ case 'image': imgPreloader = new Image(); // Preload the neighbour images nextImage = new Image(); if(isSet && set_position < $(pp_images).size() -1) nextImage.src = pp_images[set_position + 1]; prevImage = new Image(); if(isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1]; $pp_pic_holder.find('#pp_full_res')[0].innerHTML = settings.image_markup.replace(/{path}/g,pp_images[set_position]); imgPreloader.onload = function(){ // Fit item to viewport pp_dimensions = _fitToViewport(imgPreloader.width,imgPreloader.height); _showContent(); }; imgPreloader.onerror = function(){ alert('Image cannot be loaded. Make sure the path is correct and image exist.'); $.prettyPhoto.close(); }; imgPreloader.src = pp_images[set_position]; break; case 'youtube': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport // Regular youtube link movie_id = getParam('v',pp_images[set_position]); // youtu.be link if(movie_id == ""){ movie_id = pp_images[set_position].split('youtu.be/'); movie_id = movie_id[1]; if(movie_id.indexOf('?') > 0) movie_id = movie_id.substr(0,movie_id.indexOf('?')); // Strip anything after the ? if(movie_id.indexOf('&') > 0) movie_id = movie_id.substr(0,movie_id.indexOf('&')); // Strip anything after the & } movie = 'http://www.youtube.com/embed/'+movie_id; (getParam('rel',pp_images[set_position])) ? movie+="?rel="+getParam('rel',pp_images[set_position]) : movie+="?rel=1"; if(settings.autoplay) movie += "&autoplay=1"; toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie); break; case 'vimeo': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport movie_id = pp_images[set_position]; var regExp = /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/; var match = movie_id.match(regExp); movie = 'http://player.vimeo.com/video/'+ match[3] +'?title=0&byline=0&portrait=0'; if(settings.autoplay) movie += "&autoplay=1;"; vimeo_width = pp_dimensions['width'] + '/embed/?moog_width='+ pp_dimensions['width']; toInject = settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie); break; case 'quicktime': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport pp_dimensions['height']+=15; pp_dimensions['contentHeight']+=15; pp_dimensions['containerHeight']+=15; // Add space for the control bar toInject = settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay); break; case 'flash': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport flash_vars = pp_images[set_position]; flash_vars = flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10,pp_images[set_position].length); filename = pp_images[set_position]; filename = filename.substring(0,filename.indexOf('?')); toInject = settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars); break; case 'iframe': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport frame_url = pp_images[set_position]; frame_url = frame_url.substr(0,frame_url.indexOf('iframe')-1); toInject = settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url); break; case 'ajax': doresize = false; // Make sure the dimensions are not resized. pp_dimensions = _fitToViewport(movie_width,movie_height); doresize = true; // Reset the dimensions skipInjection = true; $.get(pp_images[set_position],function(responseHTML){ toInject = settings.inline_markup.replace(/{content}/g,responseHTML); $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject; _showContent(); }); break; case 'custom': pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport toInject = settings.custom_markup; break; case 'inline': // to get the item height clone it, apply default width, wrap it in the prettyPhoto containers , then delete myClone = $(pp_images[set_position]).clone().append('
').css({'width':settings.default_width}).wrapInner('
').appendTo($('body')).show(); doresize = false; // Make sure the dimensions are not resized. pp_dimensions = _fitToViewport($(myClone).width(),$(myClone).height()); doresize = true; // Reset the dimensions $(myClone).remove(); toInject = settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html()); break; }; if(!imgPreloader && !skipInjection){ $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject; // Show content _showContent(); }; }); return false; }; /** * Change page in the prettyPhoto modal box * @param direction {String} Direction of the paging, previous or next. */ $.prettyPhoto.changePage = function(direction){ currentGalleryPage = 0; if(direction == 'previous') { set_position--; if (set_position < 0) set_position = $(pp_images).size()-1; }else if(direction == 'next'){ set_position++; if(set_position > $(pp_images).size()-1) set_position = 0; }else{ set_position=direction; }; rel_index = set_position; if(!doresize) doresize = true; // Allow the resizing of the images if(settings.allow_expand) { $('.pp_contract').removeClass('pp_contract').addClass('pp_expand'); } _hideContent(function(){ $.prettyPhoto.open(); }); }; /** * Change gallery page in the prettyPhoto modal box * @param direction {String} Direction of the paging, previous or next. */ $.prettyPhoto.changeGalleryPage = function(direction){ if(direction=='next'){ currentGalleryPage ++; if(currentGalleryPage > totalPage) currentGalleryPage = 0; }else if(direction=='previous'){ currentGalleryPage --; if(currentGalleryPage < 0) currentGalleryPage = totalPage; }else{ currentGalleryPage = direction; }; slide_speed = (direction == 'next' || direction == 'previous') ? settings.animation_speed : 0; slide_to = currentGalleryPage * (itemsPerPage * itemWidth); $pp_gallery.find('ul').animate({left:-slide_to},slide_speed); }; /** * Start the slideshow... */ $.prettyPhoto.startSlideshow = function(){ if(typeof pp_slideshow == 'undefined'){ $pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){ $.prettyPhoto.stopSlideshow(); return false; }); pp_slideshow = setInterval($.prettyPhoto.startSlideshow,settings.slideshow); }else{ $.prettyPhoto.changePage('next'); }; } /** * Stop the slideshow... */ $.prettyPhoto.stopSlideshow = function(){ $pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){ $.prettyPhoto.startSlideshow(); return false; }); clearInterval(pp_slideshow); pp_slideshow=undefined; } /** * Closes prettyPhoto. */ $.prettyPhoto.close = function(){ if($pp_overlay.is(":animated")) return; $.prettyPhoto.stopSlideshow(); $pp_pic_holder.stop().find('object,embed').css('visibility','hidden'); $('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); }); $pp_overlay.fadeOut(settings.animation_speed, function(){ if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','visible'); // Show the flash $(this).remove(); // No more need for the prettyPhoto markup $(window).unbind('scroll.prettyphoto'); clearHashtag(); settings.callback(); doresize = true; pp_open = false; delete settings; }); }; /** * Set the proper sizes on the containers and animate the content in. */ function _showContent(){ $('.pp_loaderIcon').hide(); // Calculate the opened top position of the pic holder projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2)); if(projectedTop < 0) projectedTop = 0; $ppt.fadeTo(settings.animation_speed,1); // Resize the content holder $pp_pic_holder.find('.pp_content') .animate({ height:pp_dimensions['contentHeight'], width:pp_dimensions['contentWidth'] },settings.animation_speed); // Resize picture the holder $pp_pic_holder.animate({ 'top': projectedTop, 'left': ((windowWidth/2) - (pp_dimensions['containerWidth']/2) < 0) ? 0 : (windowWidth/2) - (pp_dimensions['containerWidth']/2), width:pp_dimensions['containerWidth'] },settings.animation_speed,function(){ $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']); $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); // Fade the new content // Show the nav if(isSet && _getFileType(pp_images[set_position])=="image") { $pp_pic_holder.find('.pp_hoverContainer').show(); }else{ $pp_pic_holder.find('.pp_hoverContainer').hide(); } if(settings.allow_expand) { if(pp_dimensions['resized']){ // Fade the resizing link if the image is resized $('a.pp_expand,a.pp_contract').show(); }else{ $('a.pp_expand').hide(); } } if(settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto.startSlideshow(); settings.changepicturecallback(); // Callback! pp_open = true; }); _insert_gallery(); pp_settings.ajaxcallback(); }; /** * Hide the content...DUH! */ function _hideContent(callback){ // Fade out the current picture $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden'); $pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){ $('.pp_loaderIcon').show(); callback(); }); }; /** * Check the item position in the gallery array, hide or show the navigation links * @param setCount {integer} The total number of items in the set */ function _checkPosition(setCount){ (setCount > 1) ? $('.pp_nav').show() : $('.pp_nav').hide(); // Hide the bottom nav if it's not a set. }; /** * Resize the item dimensions if it's bigger than the viewport * @param width {integer} Width of the item to be opened * @param height {integer} Height of the item to be opened * @return An array containin the "fitted" dimensions */ function _fitToViewport(width,height){ resized = false; _getDimensions(width,height); // Define them in case there's no resize needed imageWidth = width, imageHeight = height; if( ((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allow_resize && !percentBased) { resized = true, fitting = false; while (!fitting){ if((pp_containerWidth > windowWidth)){ imageWidth = (windowWidth - 200); imageHeight = (height/width) * imageWidth; }else if((pp_containerHeight > windowHeight)){ imageHeight = (windowHeight - 200); imageWidth = (width/height) * imageHeight; }else{ fitting = true; }; pp_containerHeight = imageHeight, pp_containerWidth = imageWidth; }; if((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)){ _fitToViewport(pp_containerWidth,pp_containerHeight) }; _getDimensions(imageWidth,imageHeight); }; return { width:Math.floor(imageWidth), height:Math.floor(imageHeight), containerHeight:Math.floor(pp_containerHeight), containerWidth:Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2), contentHeight:Math.floor(pp_contentHeight), contentWidth:Math.floor(pp_contentWidth), resized:resized }; }; /** * Get the containers dimensions according to the item size * @param width {integer} Width of the item to be opened * @param height {integer} Height of the item to be opened */ function _getDimensions(width,height){ width = parseFloat(width); height = parseFloat(height); // Get the details height, to do so, I need to clone it since it's invisible $pp_details = $pp_pic_holder.find('.pp_details'); $pp_details.width(width); detailsHeight = parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom')); $pp_details = $pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({ 'position':'absolute', 'top':-10000 }); detailsHeight += $pp_details.height(); detailsHeight = (detailsHeight <= 34) ? 36 : detailsHeight; // Min-height for the details $pp_details.remove(); // Get the titles height, to do so, I need to clone it since it's invisible $pp_title = $pp_pic_holder.find('.ppt'); $pp_title.width(width); titleHeight = parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom')); $pp_title = $pp_title.clone().appendTo($('body')).css({ 'position':'absolute', 'top':-10000 }); titleHeight += $pp_title.height(); $pp_title.remove(); // Get the container size, to resize the holder to the right dimensions pp_contentHeight = height + detailsHeight; pp_contentWidth = width; pp_containerHeight = pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height(); pp_containerWidth = width; } function _getFileType(itemSrc){ if (itemSrc.match(/youtube\.com\/watch/i) || itemSrc.match(/youtu\.be/i)) { return 'youtube'; }else if (itemSrc.match(/vimeo\.com/i)) { return 'vimeo'; }else if(itemSrc.match(/\b.mov\b/i)){ return 'quicktime'; }else if(itemSrc.match(/\b.swf\b/i)){ return 'flash'; }else if(itemSrc.match(/\biframe=true\b/i)){ return 'iframe'; }else if(itemSrc.match(/\bajax=true\b/i)){ return 'ajax'; }else if(itemSrc.match(/\bcustom=true\b/i)){ return 'custom'; }else if(itemSrc.substr(0,1) == '#'){ return 'inline'; }else{ return 'image'; }; }; function _center_overlay(){ if(doresize && typeof $pp_pic_holder != 'undefined') { scroll_pos = _get_scroll(); contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width(); projectedTop = (windowHeight/2) + scroll_pos['scrollTop'] - (contentHeight/2); if(projectedTop < 0) projectedTop = 0; if(contentHeight > windowHeight) return; $pp_pic_holder.css({ 'top': projectedTop, 'left': (windowWidth/2) + scroll_pos['scrollLeft'] - (contentwidth/2) }); }; }; function _get_scroll(){ if (self.pageYOffset) { return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}; } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}; } else if (document.body) {// all other Explorers return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}; }; }; function _resize_overlay() { windowHeight = $(window).height(), windowWidth = $(window).width(); if(typeof $pp_overlay != "undefined") $pp_overlay.height($(document).height()).width(windowWidth); }; function _insert_gallery(){ if(isSet && settings.overlay_gallery && _getFileType(pp_images[set_position])=="image") { itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin. navWidth = (settings.theme == "facebook" || settings.theme == "pp_default") ? 50 : 30; // Define the arrow width depending on the theme itemsPerPage = Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth); itemsPerPage = (itemsPerPage < pp_images.length) ? itemsPerPage : pp_images.length; totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1; // Hide the nav in the case there's no need for links if(totalPage == 0){ navWidth = 0; // No nav means no width! $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').hide(); }else{ $pp_gallery.find('.pp_arrow_next,.pp_arrow_previous').show(); }; galleryWidth = itemsPerPage * itemWidth; fullGalleryWidth = pp_images.length * itemWidth; // Set the proper width to the gallery items $pp_gallery .css('margin-left',-((galleryWidth/2) + (navWidth/2))) .find('div:first').width(galleryWidth+5) .find('ul').width(fullGalleryWidth) .find('li.selected').removeClass('selected'); goToPage = (Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage) : totalPage; $.prettyPhoto.changeGalleryPage(goToPage); $pp_gallery_li.filter(':eq('+set_position+')').addClass('selected'); }else{ $pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave'); // $pp_gallery.hide(); } } function _build_overlay(caller){ // Inject Social Tool markup into General markup if(settings.social_tools) facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href)); settings.markup = settings.markup.replace('{pp_social}',''); $('body').append(settings.markup); // Inject the markup $pp_pic_holder = $('.pp_pic_holder') , $ppt = $('.ppt'), $pp_overlay = $('div.pp_overlay'); // Set my global selectors // Inject the inline gallery! if(isSet && settings.overlay_gallery) { currentGalleryPage = 0; toInject = ""; for (var i=0; i < pp_images.length; i++) { if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){ classname = 'default'; img_src = ''; }else{ classname = ''; img_src = pp_images[i]; } toInject += "
  • "; }; toInject = settings.gallery_markup.replace(/{gallery}/g,toInject); $pp_pic_holder.find('#pp_full_res').after(toInject); $pp_gallery = $('.pp_pic_holder .pp_gallery'), $pp_gallery_li = $pp_gallery.find('li'); // Set the gallery selectors $pp_gallery.find('.pp_arrow_next').click(function(){ $.prettyPhoto.changeGalleryPage('next'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_gallery.find('.pp_arrow_previous').click(function(){ $.prettyPhoto.changeGalleryPage('previous'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_pic_holder.find('.pp_content').hover( function(){ $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn(); }, function(){ $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut(); }); itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin. $pp_gallery_li.each(function(i){ $(this) .find('a') .click(function(){ $.prettyPhoto.changePage(i); $.prettyPhoto.stopSlideshow(); return false; }); }); }; // Inject the play/pause if it's a slideshow if(settings.slideshow){ $pp_pic_holder.find('.pp_nav').prepend('Play') $pp_pic_holder.find('.pp_nav .pp_play').click(function(){ $.prettyPhoto.startSlideshow(); return false; }); } $pp_pic_holder.attr('class','pp_pic_holder ' + settings.theme); // Set the proper theme $pp_overlay .css({ 'opacity':0, 'height':$(document).height(), 'width':$(window).width() }) .bind('click',function(){ if(!settings.modal) $.prettyPhoto.close(); }); $('a.pp_close').bind('click',function(){ $.prettyPhoto.close(); return false; }); if(settings.allow_expand) { $('a.pp_expand').bind('click',function(e){ // Expand the image if($(this).hasClass('pp_expand')){ $(this).removeClass('pp_expand').addClass('pp_contract'); doresize = false; }else{ $(this).removeClass('pp_contract').addClass('pp_expand'); doresize = true; }; _hideContent(function(){ $.prettyPhoto.open(); }); return false; }); } $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){ $.prettyPhoto.changePage('previous'); $.prettyPhoto.stopSlideshow(); return false; }); $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){ $.prettyPhoto.changePage('next'); $.prettyPhoto.stopSlideshow(); return false; }); _center_overlay(); // Center it }; if(!pp_alreadyInitialized && getHashtag()){ pp_alreadyInitialized = true; // Grab the rel index to trigger the click on the correct element hashIndex = getHashtag(); hashRel = hashIndex; hashIndex = hashIndex.substring(hashIndex.indexOf('/')+1,hashIndex.length-1); hashRel = hashRel.substring(0,hashRel.indexOf('/')); // Little timeout to make sure all the prettyPhoto initialize scripts has been run. // Useful in the event the page contain several init scripts. setTimeout(function(){ $("a["+pp_settings.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger('click'); },50); } return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize); // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once }; function getHashtag(){ var url = location.href; hashtag = (url.indexOf('#prettyPhoto') !== -1) ? decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)) : false; if(hashtag){ hashtag = hashtag.replace(/<|>/g,''); } return hashtag; }; function setHashtag(){ if(typeof theRel == 'undefined') return; // theRel is set on normal calls, it's impossible to deeplink using the API location.hash = theRel + '/'+rel_index+'/'; }; function clearHashtag(){ if ( location.href.indexOf('#prettyPhoto') !== -1 ) location.hash = "prettyPhoto"; } function getParam(name,url){ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( url ); return ( results == null ) ? "" : results[1]; } })(jQuery); var pp_alreadyInitialized = false; // Used for the deep linking to make sure not to call the same function several times.; // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/jquery-countdown/jquery.knob.js?ver=1.2.11 /** * Downward compatible, touchable dial * * Version: 1.2.11 * Requires: jQuery v1.7+ * * Copyright (c) 2012 Anthony Terrien * Under MIT License (http://www.opensource.org/licenses/mit-license.php) * * Thanks to vor, eskimoblood, spiffistan, FabrizioC */ (function(e){if(typeof exports==="object"){module.exports=e(require("jquery"))}else if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){"use strict";var t={},n=Math.max,r=Math.min;t.c={};t.c.d=e(document);t.c.t=function(e){return e.originalEvent.touches.length-1};t.o=function(){var n=this;this.o=null;this.$=null;this.i=null;this.g=null;this.v=null;this.cv=null;this.x=0;this.y=0;this.w=0;this.h=0;this.$c=null;this.c=null;this.t=0;this.isInit=false;this.fgColor=null;this.pColor=null;this.dH=null;this.cH=null;this.eH=null;this.rH=null;this.scale=1;this.relative=false;this.relativeWidth=false;this.relativeHeight=false;this.$div=null;this.run=function(){var t=function(e,t){var r;for(r in t){n.o[r]=t[r]}n._carve().init();n._configure()._draw()};if(this.$.data("kontroled"))return;this.$.data("kontroled",true);this.extend();this.o=e.extend({min:this.$.data("min")!==undefined?this.$.data("min"):0,max:this.$.data("max")!==undefined?this.$.data("max"):100,stopper:true,readOnly:this.$.data("readonly")||this.$.attr("readonly")==="readonly",cursor:this.$.data("cursor")===true&&30||this.$.data("cursor")||0,thickness:this.$.data("thickness")&&Math.max(Math.min(this.$.data("thickness"),1),.01)||.35,lineCap:this.$.data("linecap")||"butt",width:this.$.data("width")||200,height:this.$.data("height")||200,displayInput:this.$.data("displayinput")==null||this.$.data("displayinput"),displayPrevious:this.$.data("displayprevious"),fgColor:this.$.data("fgcolor")||"#87CEEB",inputColor:this.$.data("inputcolor"),font:this.$.data("font")||"Arial",fontWeight:this.$.data("font-weight")||"bold",inline:false,step:this.$.data("step")||1,rotation:this.$.data("rotation"),draw:null,change:null,cancel:null,release:null,format:function(e){return e},parse:function(e){return parseFloat(e)}},this.o);this.o.flip=this.o.rotation==="anticlockwise"||this.o.rotation==="acw";if(!this.o.inputColor){this.o.inputColor=this.o.fgColor}if(this.$.is("fieldset")){this.v={};this.i=this.$.find("input");this.i.each(function(t){var r=e(this);n.i[t]=r;n.v[t]=n.o.parse(r.val());r.bind("change blur",function(){var e={};e[t]=r.val();n.val(n._validate(e))})});this.$.find("legend").remove()}else{this.i=this.$;this.v=this.o.parse(this.$.val());this.v===""&&(this.v=this.o.min);this.$.bind("change blur",function(){n.val(n._validate(n.o.parse(n.$.val())))})}!this.o.displayInput&&this.$.hide();this.$c=e(document.createElement("canvas")).attr({width:this.o.width,height:this.o.height});this.$div=e('
    ');this.$.wrap(this.$div).before(this.$c);this.$div=this.$.parent();if(typeof G_vmlCanvasManager!=="undefined"){G_vmlCanvasManager.initElement(this.$c[0])}this.c=this.$c[0].getContext?this.$c[0].getContext("2d"):null;if(!this.c){throw{name:"CanvasNotSupportedException",message:"Canvas not supported. Please use excanvas on IE8.0.",toString:function(){return this.name+": "+this.message}}}this.scale=(window.devicePixelRatio||1)/(this.c.webkitBackingStorePixelRatio||this.c.mozBackingStorePixelRatio||this.c.msBackingStorePixelRatio||this.c.oBackingStorePixelRatio||this.c.backingStorePixelRatio||1);this.relativeWidth=this.o.width%1!==0&&this.o.width.indexOf("%");this.relativeHeight=this.o.height%1!==0&&this.o.height.indexOf("%");this.relative=this.relativeWidth||this.relativeHeight;this._carve();if(this.v instanceof Object){this.cv={};this.copy(this.v,this.cv)}else{this.cv=this.v}this.$.bind("configure",t).parent().bind("configure",t);this._listen()._configure()._xy().init();this.isInit=true;this.$.val(this.o.format(this.v));this._draw();return this};this._carve=function(){if(this.relative){var e=this.relativeWidth?this.$div.parent().width()*parseInt(this.o.width)/100:this.$div.parent().width(),t=this.relativeHeight?this.$div.parent().height()*parseInt(this.o.height)/100:this.$div.parent().height();this.w=this.h=Math.min(e,t)}else{this.w=this.o.width;this.h=this.o.height}this.$div.css({width:this.w+"px",height:this.h+"px"});this.$c.attr({width:this.w,height:this.h});if(this.scale!==1){this.$c[0].width=this.$c[0].width*this.scale;this.$c[0].height=this.$c[0].height*this.scale;this.$c.width(this.w);this.$c.height(this.h)}return this};this._draw=function(){var e=true;n.g=n.c;n.clear();n.dH&&(e=n.dH());e!==false&&n.draw()};this._touch=function(e){var r=function(e){var t=n.xy2val(e.originalEvent.touches[n.t].pageX,e.originalEvent.touches[n.t].pageY);if(t==n.cv)return;if(n.cH&&n.cH(t)===false)return;n.change(n._validate(t));n._draw()};this.t=t.c.t(e);r(e);t.c.d.bind("touchmove.k",r).bind("touchend.k",function(){t.c.d.unbind("touchmove.k touchend.k");n.val(n.cv)});return this};this._mouse=function(e){var r=function(e){var t=n.xy2val(e.pageX,e.pageY);if(t==n.cv)return;if(n.cH&&n.cH(t)===false)return;n.change(n._validate(t));n._draw()};r(e);t.c.d.bind("mousemove.k",r).bind("keyup.k",function(e){if(e.keyCode===27){t.c.d.unbind("mouseup.k mousemove.k keyup.k");if(n.eH&&n.eH()===false)return;n.cancel()}}).bind("mouseup.k",function(e){t.c.d.unbind("mousemove.k mouseup.k keyup.k");n.val(n.cv)});return this};this._xy=function(){var e=this.$c.offset();this.x=e.left;this.y=e.top;return this};this._listen=function(){if(!this.o.readOnly){this.$c.bind("mousedown",function(e){e.preventDefault();n._xy()._mouse(e)}).bind("touchstart",function(e){e.preventDefault();n._xy()._touch(e)});this.listen()}else{this.$.attr("readonly","readonly")}if(this.relative){e(window).resize(e.debounce(50,function(){n._carve().init();n._draw()}))}return this};this._configure=function(){if(this.o.draw)this.dH=this.o.draw;if(this.o.change)this.cH=this.o.change;if(this.o.cancel)this.eH=this.o.cancel;if(this.o.release)this.rH=this.o.release;if(this.o.displayPrevious){this.pColor=this.h2rgba(this.o.fgColor,"0.4");this.fgColor=this.h2rgba(this.o.fgColor,"0.6")}else{this.fgColor=this.o.fgColor}return this};this._clear=function(){this.$c[0].width=this.$c[0].width};this._validate=function(e){var t=~~((e<0?-.5:.5)+e/this.o.step)*this.o.step;return Math.round(t*100)/100};this.listen=function(){};this.extend=function(){};this.init=function(){};this.change=function(e){};this.val=function(e){};this.xy2val=function(e,t){};this.draw=function(){};this.clear=function(){this._clear()};this.h2rgba=function(e,t){var n;e=e.substring(1,7);n=[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)];return"rgba("+n[0]+","+n[1]+","+n[2]+","+t+")"};this.copy=function(e,t){for(var n in e){t[n]=e[n]}}};t.Dial=function(){t.o.call(this);this.startAngle=null;this.xy=null;this.radius=null;this.lineWidth=null;this.cursorExt=null;this.w2=null;this.PI2=2*Math.PI;this.extend=function(){this.o=e.extend({bgColor:this.$.data("bgcolor")||"#EEEEEE",angleOffset:this.$.data("angleoffset")||0,angleArc:this.$.data("anglearc")||360,inline:true},this.o)};this.val=function(e,t){if(null!=e){e=this.o.parse(e);if(t!==false&&e!=this.v&&this.rH&&this.rH(e)===false){return}this.cv=this.o.stopper?n(r(e,this.o.max),this.o.min):e;this.v=this.cv;this.$.val(this.o.format(this.v));this._draw()}else{return this.v}};this.xy2val=function(e,t){var i,s;i=Math.atan2(e-(this.x+this.w2),-(t-this.y-this.w2))-this.angleOffset;if(this.o.flip){i=this.angleArc-i-this.PI2}if(this.angleArc!=this.PI2&&i<0&&i>-.5){i=0}else if(i<0){i+=this.PI2}s=i*(this.o.max-this.o.min)/this.angleArc+this.o.min;this.o.stopper&&(s=n(r(s,this.o.max),this.o.min));return s};this.listen=function(){var t=this,i,s,o=function(e){e.preventDefault();var o=e.originalEvent,u=o.detail||o.wheelDeltaX,a=o.detail||o.wheelDeltaY,f=t._validate(t.o.parse(t.$.val()))+(u>0||a>0?t.o.step:u<0||a<0?-t.o.step:0);f=n(r(f,t.o.max),t.o.min);t.val(f,false);if(t.rH){clearTimeout(i);i=setTimeout(function(){t.rH(f);i=null},100);if(!s){s=setTimeout(function(){if(i)t.rH(f);s=null},200)}}},u,a,f=1,l={37:-t.o.step,38:t.o.step,39:t.o.step,40:-t.o.step};this.$.bind("keydown",function(i){var s=i.keyCode;if(s>=96&&s<=105){s=i.keyCode=s-48}u=parseInt(String.fromCharCode(s));if(isNaN(u)){s!==13&&s!==8&&s!==9&&s!==189&&(s!==190||t.$.val().match(/\./))&&i.preventDefault();if(e.inArray(s,[37,38,39,40])>-1){i.preventDefault();var o=t.o.parse(t.$.val())+l[s]*f;t.o.stopper&&(o=n(r(o,t.o.max),t.o.min));t.change(t._validate(o));t._draw();a=window.setTimeout(function(){f*=2},30)}}}).bind("keyup",function(e){if(isNaN(u)){if(a){window.clearTimeout(a);a=null;f=1;t.val(t.$.val())}}else{t.$.val()>t.o.max&&t.$.val(t.o.max)||t.$.val()this.o.max){this.v=this.o.min}this.$.val(this.v);this.w2=this.w/2;this.cursorExt=this.o.cursor/100;this.xy=this.w2*this.scale;this.lineWidth=this.xy*this.o.thickness;this.lineCap=this.o.lineCap;this.radius=this.xy-this.lineWidth/2;this.o.angleOffset&&(this.o.angleOffset=isNaN(this.o.angleOffset)?0:this.o.angleOffset);this.o.angleArc&&(this.o.angleArc=isNaN(this.o.angleArc)?this.PI2:this.o.angleArc);this.angleOffset=this.o.angleOffset*Math.PI/180;this.angleArc=this.o.angleArc*Math.PI/180;this.startAngle=1.5*Math.PI+this.angleOffset;this.endAngle=1.5*Math.PI+this.angleOffset+this.angleArc;var e=n(String(Math.abs(this.o.max)).length,String(Math.abs(this.o.min)).length,2)+2;this.o.displayInput&&this.i.css({width:(this.w/2+4>>0)+"px",height:(this.w/3>>0)+"px",position:"absolute","vertical-align":"middle","margin-top":(this.w/3>>0)+"px","margin-left":"-"+(this.w*3/4+2>>0)+"px",border:0,background:"none",font:this.o.fontWeight+" "+(this.w/e>>0)+"px "+this.o.font,"text-align":"center",color:this.o.inputColor||this.o.fgColor,padding:"0px","-webkit-appearance":"none"})||this.i.css({width:"0px",visibility:"hidden"})};this.change=function(e){this.cv=e;this.$.val(this.o.format(e))};this.angle=function(e){return(e-this.o.min)*this.angleArc/(this.o.max-this.o.min)};this.arc=function(e){var t,n;e=this.angle(e);if(this.o.flip){t=this.endAngle+1e-5;n=t-e-1e-5}else{t=this.startAngle-1e-5;n=t+e+1e-5}this.o.cursor&&(t=n-this.cursorExt)&&(n=n+this.cursorExt);return{s:t,e:n,d:this.o.flip&&!this.o.cursor}};this.draw=function(){var e=this.g,t=this.arc(this.cv),n,r=1;e.lineWidth=this.lineWidth;e.lineCap=this.lineCap;if(this.o.bgColor!=="none"){e.beginPath();e.strokeStyle=this.o.bgColor;e.arc(this.xy,this.xy,this.radius,this.endAngle-1e-5,this.startAngle+1e-5,true);e.stroke()}if(this.o.displayPrevious){n=this.arc(this.v);e.beginPath();e.strokeStyle=this.pColor;e.arc(this.xy,this.xy,this.radius,n.s,n.e,n.d);e.stroke();r=this.cv==this.v}e.beginPath();e.strokeStyle=r?this.o.fgColor:this.fgColor;e.arc(this.xy,this.xy,this.radius,t.s,t.e,t.d);e.stroke()};this.cancel=function(){this.val(this.v)}};e.fn.dial=e.fn.knob=function(n){return this.each(function(){var r=new t.Dial;r.o=n;r.$=e(this);r.run()}).parent()}}); // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/jquery-countdown/jquery.throttle.js?ver=5.7.2 /* * jQuery throttle / debounce - v1.1 - 3/7/2010 * http://benalman.com/projects/jquery-throttle-debounce-plugin/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ (function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/jquery-countdown/jquery.classycountdown.min.js?ver=1.1.0 /*! * jQuery ClassyCountdown * vox.SPACE * * Written by voxspace AT riseup.net * Licensed under the MIT license https://vox.SPACE/LICENSE-MIT * Version 1.1.0 * */ (function (c) { c.fn.ClassyCountdown = function (k, r) { function l() { e = Math.floor(d / 86400); f = Math.floor(d % 86400 / 3600); g = Math.floor(d % 86400 % 3600 / 60); h = Math.floor(d % 86400 % 3600 % 60 % 60) } function m() { d--; l(); 0 >= d && (n || (n = !0, b.onEndCallback()), h = g = f = e = 0); a.find(".ClassyCountdown-days input").val(365 - e).trigger("change"); a.find(".ClassyCountdown-hours input").val(24 - f).trigger("change"); a.find(".ClassyCountdown-minutes input").val(60 - g).trigger("change"); a.find(".ClassyCountdown-seconds input").val(60 - h).trigger("change"); a.find(".ClassyCountdown-days .ClassyCountdown-value > div").html(e); a.find(".ClassyCountdown-hours .ClassyCountdown-value > div").html(f); a.find(".ClassyCountdown-minutes .ClassyCountdown-value > div").html(g); a.find(".ClassyCountdown-seconds .ClassyCountdown-value > div").html(h) } function p() { a.find(".ClassyCountdown-wrapper > div").each(function () { c(this).css("height", c(this).width() + "px") }); b.style.textResponsive && a.find(".ClassyCountdown-value").css("font-size", Math.floor(a.find("> div").eq(0).width() * b.style.textResponsive / 10) + "px"); a.find(".ClassyCountdown-value").each(function () { c(this).css("margin-top", Math.floor(0 - parseInt(c(this).height()) / 2) + "px") }); a.find(".ClassyCountdown-days input").trigger("change"); a.find(".ClassyCountdown-hours input").trigger("change"); a.find(".ClassyCountdown-minutes input").trigger("change"); a.find(".ClassyCountdown-seconds input").trigger("change") } function q(a) { switch (a) { case "flat-colors": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .01, bgColor : "rgba(0,0,0,0.05)", fgColor : "#1abc9c" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours : { gauge : { thickness : .01, bgColor : "rgba(0,0,0,0.05)", fgColor : "#2980b9" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes : { gauge : { thickness : .01, bgColor : "rgba(0,0,0,0.05)", fgColor : "#8e44ad" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds : { gauge : { thickness : .01, bgColor : "rgba(0,0,0,0.05)", fgColor : "#f39c12" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" } } }; case "flat-colors-wide": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .03, bgColor : "rgba(0,0,0,0.05)", fgColor : "#1abc9c" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours : { gauge : { thickness : .03, bgColor : "rgba(0,0,0,0.05)", fgColor : "#2980b9" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes : { gauge : { thickness : .03, bgColor : "rgba(0,0,0,0.05)", fgColor : "#8e44ad" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds : { gauge : { thickness : .03, bgColor : "rgba(0,0,0,0.05)", fgColor : "#f39c12" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" } } }; case "flat-colors-very-wide": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .12, bgColor : "rgba(0,0,0,0.05)", fgColor : "#1abc9c" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours : { gauge : { thickness : .12, bgColor : "rgba(0,0,0,0.05)", fgColor : "#2980b9" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes : { gauge : { thickness : .12, bgColor : "rgba(0,0,0,0.05)", fgColor : "#8e44ad" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds : { gauge : { thickness : .12, bgColor : "rgba(0,0,0,0.05)", fgColor : "#f39c12" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" } } }; case "flat-colors-black": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .25, bgColor : "rgba(0,0,0,0.05)", fgColor : "#1abc9c", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours : { gauge : { thickness : .25, bgColor : "rgba(0,0,0,0.05)", fgColor : "#2980b9", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes : { gauge : { thickness : .25, bgColor : "rgba(0,0,0,0.05)", fgColor : "#8e44ad", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds : { gauge : { thickness : .25, bgColor : "rgba(0,0,0,0.05)", fgColor : "#f39c12", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" } } }; case "black": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .01, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours : { gauge : { thickness : .01, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes : { gauge : { thickness : .01, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds : { gauge : { thickness : .01, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" } } }; case "black-wide": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .03, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours : { gauge : { thickness : .03, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes : { gauge : { thickness : .03, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds : { gauge : { thickness : .03, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" } } }; case "black-very-wide": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .17, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours : { gauge : { thickness : .17, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes : { gauge : { thickness : .17, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds : { gauge : { thickness : .17, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" } } }; case "black-black": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .25, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, hours : { gauge : { thickness : .25, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, minutes : { gauge : { thickness : .25, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" }, seconds : { gauge : { thickness : .25, bgColor : "rgba(0,0,0,0.05)", fgColor : "#222", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#34495e;" } } }; case "white": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .03, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, hours : { gauge : { thickness : .03, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, minutes : { gauge : { thickness : .03, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, seconds : { gauge : { thickness : .03, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" } } }; case "white-wide": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .06, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, hours : { gauge : { thickness : .06, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, minutes : { gauge : { thickness : .06, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, seconds : { gauge : { thickness : .06, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" } } }; case "white-very-wide": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .16, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, hours : { gauge : { thickness : .16, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, minutes : { gauge : { thickness : .16, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, seconds : { gauge : { thickness : .16, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" } } }; case "white-black": return { labels : !0, style : { element : "", textResponsive : .5, days : { gauge : { thickness : .25, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, hours : { gauge : { thickness : .25, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, minutes : { gauge : { thickness : .25, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" }, seconds : { gauge : { thickness : .25, bgColor : "rgba(255,255,255,0.05)", fgColor : "#fff", lineCap : "round" }, textCSS : "font-family:'Open Sans';font-weight:300;color:#fff;" } } } } } var a = c(this), e, f, g, h, d, n = !1, b = { end : void 0, now : c.now(), labels : !0, labelsOptions : { lang : { days : "Days", hours : "Hours", minutes : "Minutes", seconds : "Seconds" }, style : "font-size: 0.5em;" }, style : { element : "", labels : !1, textResponsive : .5, days : { gauge : { thickness : .02, bgColor : "rgba(0, 0, 0, 0)", fgColor : "rgba(0, 0, 0, 1)", lineCap : "butt" }, textCSS : "" }, hours : { gauge : { thickness : .02, bgColor : "rgba(0, 0, 0, 0)", fgColor : "rgba(0, 0, 0, 1)", lineCap : "butt" }, textCSS : "" }, minutes : { gauge : { thickness : .02, bgColor : "rgba(0, 0, 0, 0)", fgColor : "rgba(0, 0, 0, 1)", lineCap : "butt" }, textCSS : "" }, seconds : { gauge : { thickness : .02, bgColor : "rgba(0, 0, 0, 0)", fgColor : "rgba(0, 0, 0, 1)", lineCap : "butt" }, textCSS : "" } }, onEndCallback : function () {} }; k.theme && (b = c.extend(!0, b, q(k.theme))); b = c.extend(!0, b, k); (function () { a.append('
    '); a.find(".ClassyCountdown-days input").knob(c.extend({ width : "100%", displayInput : !1, readOnly : !0, max : 365 }, b.style.days.gauge)); a.find(".ClassyCountdown-hours input").knob(c.extend({ width : "100%", displayInput : !1, readOnly : !0, max : 24 }, b.style.hours.gauge)); a.find(".ClassyCountdown-minutes input").knob(c.extend({ width : "100%", displayInput : !1, readOnly : !0, max : 60 }, b.style.minutes.gauge)); a.find(".ClassyCountdown-seconds input").knob(c.extend({ width : "100%", displayInput : !1, readOnly : !0, max : 60 }, b.style.seconds.gauge)); a.find(".ClassyCountdown-wrapper > div").attr("style", b.style.element); a.find(".ClassyCountdown-days .ClassyCountdown-value").attr("style", b.style.days.textCSS); a.find(".ClassyCountdown-hours .ClassyCountdown-value").attr("style", b.style.hours.textCSS); a.find(".ClassyCountdown-minutes .ClassyCountdown-value").attr("style", b.style.minutes.textCSS); a.find(".ClassyCountdown-seconds .ClassyCountdown-value").attr("style", b.style.seconds.textCSS); a.find(".ClassyCountdown-value").each(function () { c(this).css("margin-top", Math.floor(0 - parseInt(c(this).height()) / 2) + "px") }); b.labels && (a.find(".ClassyCountdown-days .ClassyCountdown-value > span").html(b.labelsOptions.lang.days), a.find(".ClassyCountdown-hours .ClassyCountdown-value > span").html(b.labelsOptions.lang.hours), a.find(".ClassyCountdown-minutes .ClassyCountdown-value > span").html(b.labelsOptions.lang.minutes), a.find(".ClassyCountdown-seconds .ClassyCountdown-value > span").html(b.labelsOptions.lang.seconds), a.find(".ClassyCountdown-value > span").attr("style", b.labelsOptions.style)); d = b.end - b.now; l() })(); m(); setInterval(m, 1E3); (function () { a.find(".ClassyCountdown-wrapper > div").each(function () { c(this).css("height", c(this).width() + "px") }); b.style.textResponsive && (a.find(".ClassyCountdown-value").css("font-size", Math.floor(a.find("> div").eq(0).width() * b.style.textResponsive / 10) + "px"), a.find(".ClassyCountdown-value").each(function () { c(this).css("margin-top", Math.floor(0 - parseInt(c(this).height()) / 2) + "px") })); c(window).trigger("resize"); c(window).resize(c.throttle(50, p)) })() } })(jQuery); // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/js/jquery.event.move.js?ver=1.3.6 // jquery.event.move // // 1.3.6 // // Stephen Band // // Triggers 'movestart', 'move' and 'moveend' events after // mousemoves following a mousedown cross a distance threshold, // similar to the native 'dragstart', 'drag' and 'dragend' events. // Move events are throttled to animation frames. Move event objects // have the properties: // // pageX: // pageY: Page coordinates of pointer. // startX: // startY: Page coordinates of pointer at movestart. // distX: // distY: Distance the pointer has moved since movestart. // deltaX: // deltaY: Distance the finger has moved since last event. // velocityX: // velocityY: Average velocity over last few events. (function (module) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['jquery'], module); } else { // Browser globals module(jQuery); } })(function(jQuery, undefined){ var // Number of pixels a pressed pointer travels before movestart // event is fired. threshold = 6, add = jQuery.event.add, remove = jQuery.event.remove, // Just sugar, so we can have arguments in the same order as // add and remove. trigger = function(node, type, data) { jQuery.event.trigger(type, data, node); }, // Shim for requestAnimationFrame, falling back to timer. See: // see http://paulirish.com/2011/requestanimationframe-for-smart-animating/ requestFrame = (function(){ return ( window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(fn, element){ return window.setTimeout(function(){ fn(); }, 25); } ); })(), ignoreTags = { textarea: true, input: true, select: true, button: true }, mouseevents = { move: 'mousemove', cancel: 'mouseup dragstart', end: 'mouseup' }, touchevents = { move: 'touchmove', cancel: 'touchend', end: 'touchend' }; // Constructors function Timer(fn){ var callback = fn, active = false, running = false; function trigger(time) { if (active){ callback(); requestFrame(trigger); running = true; active = false; } else { running = false; } } this.kick = function(fn) { active = true; if (!running) { trigger(); } }; this.end = function(fn) { var cb = callback; if (!fn) { return; } // If the timer is not running, simply call the end callback. if (!running) { fn(); } // If the timer is running, and has been kicked lately, then // queue up the current callback and the end callback, otherwise // just the end callback. else { callback = active ? function(){ cb(); fn(); } : fn ; active = true; } }; } // Functions function returnTrue() { return true; } function returnFalse() { return false; } function preventDefault(e) { e.preventDefault(); } function preventIgnoreTags(e) { // Don't prevent interaction with form elements. if (ignoreTags[ e.target.tagName.toLowerCase() ]) { return; } e.preventDefault(); } function isLeftButton(e) { // Ignore mousedowns on any button other than the left (or primary) // mouse button, or when a modifier key is pressed. return (e.which === 1 && !e.ctrlKey && !e.altKey); } function identifiedTouch(touchList, id) { var i, l; if (touchList.identifiedTouch) { return touchList.identifiedTouch(id); } // touchList.identifiedTouch() does not exist in // webkit yet… we must do the search ourselves... i = -1; l = touchList.length; while (++i < l) { if (touchList[i].identifier === id) { return touchList[i]; } } } function changedTouch(e, event) { var touch = identifiedTouch(e.changedTouches, event.identifier); // This isn't the touch you're looking for. if (!touch) { return; } // Chrome Android (at least) includes touches that have not // changed in e.changedTouches. That's a bit annoying. Check // that this touch has changed. if (touch.pageX === event.pageX && touch.pageY === event.pageY) { return; } return touch; } // Handlers that decide when the first movestart is triggered function mousedown(e){ var data; if (!isLeftButton(e)) { return; } data = { target: e.target, startX: e.pageX, startY: e.pageY, timeStamp: e.timeStamp }; add(document, mouseevents.move, mousemove, data); add(document, mouseevents.cancel, mouseend, data); } function mousemove(e){ var data = e.data; checkThreshold(e, data, e, removeMouse); } function mouseend(e) { removeMouse(); } function removeMouse() { remove(document, mouseevents.move, mousemove); remove(document, mouseevents.cancel, mouseend); } function touchstart(e) { var touch, template; // Don't get in the way of interaction with form elements. if (ignoreTags[ e.target.tagName.toLowerCase() ]) { return; } touch = e.changedTouches[0]; // iOS live updates the touch objects whereas Android gives us copies. // That means we can't trust the touchstart object to stay the same, // so we must copy the data. This object acts as a template for // movestart, move and moveend event objects. template = { target: touch.target, startX: touch.pageX, startY: touch.pageY, timeStamp: e.timeStamp, identifier: touch.identifier }; // Use the touch identifier as a namespace, so that we can later // remove handlers pertaining only to this touch. add(document, touchevents.move + '.' + touch.identifier, touchmove, template); add(document, touchevents.cancel + '.' + touch.identifier, touchend, template); } function touchmove(e){ var data = e.data, touch = changedTouch(e, data); if (!touch) { return; } checkThreshold(e, data, touch, removeTouch); } function touchend(e) { var template = e.data, touch = identifiedTouch(e.changedTouches, template.identifier); if (!touch) { return; } removeTouch(template.identifier); } function removeTouch(identifier) { remove(document, '.' + identifier, touchmove); remove(document, '.' + identifier, touchend); } // Logic for deciding when to trigger a movestart. function checkThreshold(e, template, touch, fn) { var distX = touch.pageX - template.startX, distY = touch.pageY - template.startY; // Do nothing if the threshold has not been crossed. if ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; } triggerStart(e, template, touch, distX, distY, fn); } function handled() { // this._handled should return false once, and after return true. this._handled = returnTrue; return false; } function flagAsHandled(e) { e._handled(); } function triggerStart(e, template, touch, distX, distY, fn) { var node = template.target, touches, time; touches = e.targetTouches; time = e.timeStamp - template.timeStamp; // Create a movestart object with some special properties that // are passed only to the movestart handlers. template.type = 'movestart'; template.distX = distX; template.distY = distY; template.deltaX = distX; template.deltaY = distY; template.pageX = touch.pageX; template.pageY = touch.pageY; template.velocityX = distX / time; template.velocityY = distY / time; template.targetTouches = touches; template.finger = touches ? touches.length : 1 ; // The _handled method is fired to tell the default movestart // handler that one of the move events is bound. template._handled = handled; // Pass the touchmove event so it can be prevented if or when // movestart is handled. template._preventTouchmoveDefault = function() { e.preventDefault(); }; // Trigger the movestart event. trigger(template.target, template); // Unbind handlers that tracked the touch or mouse up till now. fn(template.identifier); } // Handlers that control what happens following a movestart function activeMousemove(e) { var timer = e.data.timer; e.data.touch = e; e.data.timeStamp = e.timeStamp; timer.kick(); } function activeMouseend(e) { var event = e.data.event, timer = e.data.timer; removeActiveMouse(); endEvent(event, timer, function() { // Unbind the click suppressor, waiting until after mouseup // has been handled. setTimeout(function(){ remove(event.target, 'click', returnFalse); }, 0); }); } function removeActiveMouse(event) { remove(document, mouseevents.move, activeMousemove); remove(document, mouseevents.end, activeMouseend); } function activeTouchmove(e) { var event = e.data.event, timer = e.data.timer, touch = changedTouch(e, event); if (!touch) { return; } // Stop the interface from gesturing e.preventDefault(); event.targetTouches = e.targetTouches; e.data.touch = touch; e.data.timeStamp = e.timeStamp; timer.kick(); } function activeTouchend(e) { var event = e.data.event, timer = e.data.timer, touch = identifiedTouch(e.changedTouches, event.identifier); // This isn't the touch you're looking for. if (!touch) { return; } removeActiveTouch(event); endEvent(event, timer); } function removeActiveTouch(event) { remove(document, '.' + event.identifier, activeTouchmove); remove(document, '.' + event.identifier, activeTouchend); } // Logic for triggering move and moveend events function updateEvent(event, touch, timeStamp, timer) { var time = timeStamp - event.timeStamp; event.type = 'move'; event.distX = touch.pageX - event.startX; event.distY = touch.pageY - event.startY; event.deltaX = touch.pageX - event.pageX; event.deltaY = touch.pageY - event.pageY; // Average the velocity of the last few events using a decay // curve to even out spurious jumps in values. event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time; event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time; event.pageX = touch.pageX; event.pageY = touch.pageY; } function endEvent(event, timer, fn) { timer.end(function(){ event.type = 'moveend'; trigger(event.target, event); return fn && fn(); }); } // jQuery special event definition function setup(data, namespaces, eventHandle) { // Stop the node from being dragged //add(this, 'dragstart.move drag.move', preventDefault); // Prevent text selection and touch interface scrolling //add(this, 'mousedown.move', preventIgnoreTags); // Tell movestart default handler that we've handled this add(this, 'movestart.move', flagAsHandled); // Don't bind to the DOM. For speed. return true; } function teardown(namespaces) { remove(this, 'dragstart drag', preventDefault); remove(this, 'mousedown touchstart', preventIgnoreTags); remove(this, 'movestart', flagAsHandled); // Don't bind to the DOM. For speed. return true; } function addMethod(handleObj) { // We're not interested in preventing defaults for handlers that // come from internal move or moveend bindings if (handleObj.namespace === "move" || handleObj.namespace === "moveend") { return; } // Stop the node from being dragged add(this, 'dragstart.' + handleObj.guid + ' drag.' + handleObj.guid, preventDefault, undefined, handleObj.selector); // Prevent text selection and touch interface scrolling add(this, 'mousedown.' + handleObj.guid, preventIgnoreTags, undefined, handleObj.selector); } function removeMethod(handleObj) { if (handleObj.namespace === "move" || handleObj.namespace === "moveend") { return; } remove(this, 'dragstart.' + handleObj.guid + ' drag.' + handleObj.guid); remove(this, 'mousedown.' + handleObj.guid); } jQuery.event.special.movestart = { setup: setup, teardown: teardown, add: addMethod, remove: removeMethod, _default: function(e) { var event, data; // If no move events were bound to any ancestors of this // target, high tail it out of here. if (!e._handled()) { return; } function update(time) { updateEvent(event, data.touch, data.timeStamp); trigger(e.target, event); } event = { target: e.target, startX: e.startX, startY: e.startY, pageX: e.pageX, pageY: e.pageY, distX: e.distX, distY: e.distY, deltaX: e.deltaX, deltaY: e.deltaY, velocityX: e.velocityX, velocityY: e.velocityY, timeStamp: e.timeStamp, identifier: e.identifier, targetTouches: e.targetTouches, finger: e.finger }; data = { event: event, timer: new Timer(update), touch: undefined, timeStamp: undefined }; if (e.identifier === undefined) { // We're dealing with a mouse // Stop clicks from propagating during a move add(e.target, 'click', returnFalse); add(document, mouseevents.move, activeMousemove, data); add(document, mouseevents.end, activeMouseend, data); } else { // We're dealing with a touch. Stop touchmove doing // anything defaulty. e._preventTouchmoveDefault(); add(document, touchevents.move + '.' + e.identifier, activeTouchmove, data); add(document, touchevents.end + '.' + e.identifier, activeTouchend, data); } } }; jQuery.event.special.move = { setup: function() { // Bind a noop to movestart. Why? It's the movestart // setup that decides whether other move events are fired. add(this, 'movestart.move', jQuery.noop); }, teardown: function() { remove(this, 'movestart.move', jQuery.noop); } }; jQuery.event.special.moveend = { setup: function() { // Bind a noop to movestart. Why? It's the movestart // setup that decides whether other move events are fired. add(this, 'movestart.moveend', jQuery.noop); }, teardown: function() { remove(this, 'movestart.moveend', jQuery.noop); } }; add(document, 'mousedown.move', mousedown); add(document, 'touchstart.move', touchstart); // Make jQuery copy touch event properties over to the jQuery event // object, if they are not already listed. But only do the ones we // really need. IE7/8 do not have Array#indexOf(), but nor do they // have touch events, so let's assume we can ignore them. if (typeof Array.prototype.indexOf === 'function') { (function(jQuery, undefined){ var props = ["changedTouches", "targetTouches"], l = props.length; while (l--) { if (jQuery.event.props.indexOf(props[l]) === -1) { jQuery.event.props.push(props[l]); } } })(jQuery); }; }); // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/js/jquery.twentytwenty.js?ver=5.7.2 (function($){ $.fn.twentytwenty = function(options) { var options = $.extend({default_offset_pct: 0.5, orientation: 'horizontal'}, options); return this.each(function() { var sliderPct = options.default_offset_pct; var container = $(this); var sliderOrientation = options.orientation; var beforeDirection = (sliderOrientation === 'vertical') ? 'down' : 'left'; var afterDirection = (sliderOrientation === 'vertical') ? 'up' : 'right'; container.wrap("
    "); container.append("
    "); var beforeImg = container.find("img:first"); var afterImg = container.find("img:last"); container.append("
    "); var slider = container.find(".twentytwenty-handle"); slider.append(""); slider.append(""); container.addClass("twentytwenty-container"); beforeImg.addClass("twentytwenty-before"); afterImg.addClass("twentytwenty-after"); var overlay = container.find(".twentytwenty-overlay"); overlay.append("
    "); overlay.append("
    "); var calcOffset = function(dimensionPct) { var w = beforeImg.width(); var h = beforeImg.height(); return { w: w+"px", h: h+"px", cw: (dimensionPct*w)+"px", ch: (dimensionPct*h)+"px" }; }; var adjustContainer = function(offset) { if (sliderOrientation === 'vertical') { beforeImg.css("clip", "rect(0,"+offset.w+","+offset.ch+",0)"); } else { beforeImg.css("clip", "rect(0,"+offset.cw+","+offset.h+",0)"); } container.css("height", offset.h); }; var adjustSlider = function(pct) { var offset = calcOffset(pct); slider.css((sliderOrientation==="vertical") ? "top" : "left", (sliderOrientation==="vertical") ? offset.ch : offset.cw); adjustContainer(offset); } $(window).on("resize.twentytwenty", function(e) { adjustSlider(sliderPct); }); var offsetX = 0; var imgWidth = 0; slider.on("movestart", function(e) { if (((e.distX > e.distY && e.distX < -e.distY) || (e.distX < e.distY && e.distX > -e.distY)) && sliderOrientation !== 'vertical') { e.preventDefault(); } else if (((e.distX < e.distY && e.distX < -e.distY) || (e.distX > e.distY && e.distX > -e.distY)) && sliderOrientation === 'vertical') { e.preventDefault(); } container.addClass("active"); offsetX = container.offset().left; offsetY = container.offset().top; imgWidth = beforeImg.width(); imgHeight = beforeImg.height(); }); slider.on("moveend", function(e) { container.removeClass("active"); }); slider.on("move", function(e) { if (container.hasClass("active")) { sliderPct = (sliderOrientation === 'vertical') ? (e.pageY-offsetY)/imgHeight : (e.pageX-offsetX)/imgWidth; if (sliderPct < 0) { sliderPct = 0; } if (sliderPct > 1) { sliderPct = 1; } adjustSlider(sliderPct); } }); container.find("img").on("mousedown", function(event) { event.preventDefault(); }); $(window).trigger("resize.twentytwenty"); }); }; })(jQuery); // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/js/audioplayer.js?ver=5.7.2 ;(function( $, window, document, undefined ) { var isTouch = 'ontouchstart' in window, eStart = isTouch ? 'touchstart' : 'mousedown', eMove = isTouch ? 'touchmove' : 'mousemove', eEnd = isTouch ? 'touchend' : 'mouseup', eCancel = isTouch ? 'touchcancel' : 'mouseup', secondsToTime = function( secs ) { var hours = Math.floor( secs / 3600 ), minutes = Math.floor( secs % 3600 / 60 ), seconds = Math.ceil( secs % 3600 % 60 ); return ( hours == 0 ? '' : hours > 0 && hours.toString().length < 2 ? '0'+hours+':' : hours+':' ) + ( minutes.toString().length < 2 ? '0'+minutes : minutes ) + ':' + ( seconds.toString().length < 2 ? '0'+seconds : seconds ); }, canPlayType = function( file ) { var audioElement = document.createElement( 'audio' ); return !!( audioElement.canPlayType && audioElement.canPlayType( 'audio/' + file.split( '.' ).pop().toLowerCase() + ';' ).replace( /no/, '' ) ); }; $.fn.audioPlayer = function( params ) { var params = $.extend( { classPrefix: 'audioplayer', strPlay: 'Play', strPause: 'Pause', strVolume: 'Volume',strControls:'',strStyle:'' }, params ), cssClass = {}, cssClassSub = { playPause: 'playpause', playing: 'playing', time: 'time', timeCurrent: 'time-current', timeDuration: 'time-duration', bar: 'bar', barLoaded: 'bar-loaded', barPlayed: 'bar-played', volume: 'volume', volumeButton: 'volume-button', volumeAdjust: 'volume-adjust', noVolume: 'novolume', mute: 'mute', mini: 'mini' }; for( var subName in cssClassSub ) cssClass[ subName ] = params.classPrefix + '-' + cssClassSub[ subName ]; this.each( function() { if( $( this ).prop( 'tagName' ).toLowerCase() != 'audio' ) return false; var $this = $( this ), audioFile = $this.attr( 'src' ), isAutoPlay = $this.get( 0 ).getAttribute( 'data-autoplay' ), isAutoPlay = isAutoPlay === 'autoplay' ? true : false, isLoop = $this.get( 0 ).getAttribute( 'data-loop' ), isLoop = isLoop === 'loop' ? true : false, isMute = $this.get( 0 ).getAttribute( 'data-mute' ), isMute = isMute === 'mute' ? true : false, isSupport = false; if( typeof audioFile === 'undefined' ) { $this.find( 'source' ).each( function() { audioFile = $( this ).attr( 'src' ); if( typeof audioFile !== 'undefined' && canPlayType( audioFile ) ) { isSupport = true; return false; } }); } else if( canPlayType( audioFile ) ) isSupport = true; var thePlayer = $( '
    ' + ( isSupport ? $( '
    ' ).append( $this.eq( 0 ).clone() ).html() : '' ) + '
    ' ), theAudio = isSupport ? thePlayer.find( 'audio' ) : thePlayer.find( 'embed' ), theAudio = theAudio.get( 0 ); if( isSupport ) { thePlayer.find( 'audio' ).css( { 'width': 0, 'height': 0, 'visibility': 'hidden' } ); thePlayer.append( '
    ' ); var theBar = thePlayer.find( '.' + cssClass.bar ), barPlayed = thePlayer.find( '.' + cssClass.barPlayed ), barLoaded = thePlayer.find( '.' + cssClass.barLoaded ), timeCurrent = thePlayer.find( '.' + cssClass.timeCurrent ), timeDuration = thePlayer.find( '.' + cssClass.timeDuration ), volumeButton = thePlayer.find( '.' + cssClass.volumeButton ), volumeAdjuster = thePlayer.find( '.' + cssClass.volumeAdjust + ' > div' ), volumeDefault = 0, adjustCurrentTime = function( e ) { theRealEvent = isTouch ? e.originalEvent.touches[ 0 ] : e; theAudio.currentTime = Math.round( ( theAudio.duration * ( theRealEvent.pageX - theBar.offset().left ) ) / theBar.width() ); }, adjustVolume = function( e ) { theRealEvent = isTouch ? e.originalEvent.touches[ 0 ] : e; theAudio.volume = 1 - Math.abs( ( ( volumeAdjuster.offset().left + volumeAdjuster.width()) - theRealEvent.pageX ) / volumeAdjuster.width() ); }, updateLoadBar = setInterval( function() { //to fix the javascript bug INDEX_SIZE_ERR. if(theAudio.buffered.length > 0){ if(theAudio.duration > 0){ barLoaded.width( ( theAudio.buffered.end( 0 ) / theAudio.duration ) * 100 + '%' ); } if( theAudio.buffered.end( 0 ) >= theAudio.duration ){ clearInterval( updateLoadBar ); } } }, 100 ); var volumeTestDefault = theAudio.volume, volumeTestValue = theAudio.volume = 0.111; if( Math.round( theAudio.volume * 1000 ) / 1000 == volumeTestValue ) theAudio.volume = volumeTestDefault; else thePlayer.addClass( cssClass.noVolume ); timeDuration.html( '…' ); timeCurrent.text( secondsToTime( 0 ) ); theAudio.addEventListener( 'loadeddata', function() { timeDuration.text( secondsToTime( theAudio.duration ) ); volumeAdjuster.find( 'div' ).width( theAudio.volume * 100 + '%' ); volumeDefault = theAudio.volume; if( isAutoPlay ) {isSupport ? theAudio.play() : theAudio.Play();thePlayer.addClass( cssClass.playing );} if(isMute){ thePlayer.addClass( cssClass.mute ); volumeDefault = theAudio.volume; theAudio.volume = 0; volumeAdjuster.find( 'div' ).width( theAudio.volume * 100 + '%' ); } }); theAudio.addEventListener( 'timeupdate', function() { timeCurrent.text( secondsToTime( theAudio.currentTime ) ); barPlayed.width( ( theAudio.currentTime / theAudio.duration ) * 100 + '%' ); }); theAudio.addEventListener( 'volumechange', function() { volumeAdjuster.find( 'div' ).width( theAudio.volume * 100 + '%' ); if( theAudio.volume > 0 && thePlayer.hasClass( cssClass.mute ) ) thePlayer.removeClass( cssClass.mute ); if( theAudio.volume <= 0 && !thePlayer.hasClass( cssClass.mute ) ) thePlayer.addClass( cssClass.mute ); }); theAudio.addEventListener( 'ended', function() { thePlayer.removeClass( cssClass.playing ); if( isLoop ) { isSupport ? theAudio.play() : theAudio.Play(); thePlayer.addClass( cssClass.playing ); } }); theBar.on( eStart, function( e ) { adjustCurrentTime( e ); theBar.on( eMove, function( e ) { adjustCurrentTime( e ); } ); }) .on( eCancel, function() { theBar.unbind( eMove ); }); volumeButton.on( 'click', function() { if( thePlayer.hasClass( cssClass.mute ) ) { thePlayer.removeClass( cssClass.mute ); theAudio.volume = volumeDefault; } else { thePlayer.addClass( cssClass.mute ); volumeDefault = theAudio.volume; theAudio.volume = 0; } return false; }); volumeAdjuster.on( eStart, function( e ) { adjustVolume( e ); volumeAdjuster.on( eMove, function( e ) { adjustVolume( e ); } ); }) .on( eCancel, function() { volumeAdjuster.unbind( eMove ); }); } else thePlayer.addClass( cssClass.mini ); thePlayer.find( '.' + cssClass.playPause ).on( 'click', function() { if( thePlayer.hasClass( cssClass.playing ) ) { $( this ).attr( 'title', params.strPlay ).find( 'a' ).html( params.strPlay ); thePlayer.removeClass( cssClass.playing ); isSupport ? theAudio.pause() : theAudio.Stop(); } else { $( this ).attr( 'title', params.strPause ).find( 'a' ).html( params.strPause ); thePlayer.addClass( cssClass.playing ); isSupport ? theAudio.play() : theAudio.Play(); } return false; }); $this.replaceWith( thePlayer ); }); return this; }; })( jQuery, window, document ); // source --> http://www.raws-hk.com/wordpress/wp-content/plugins/magee-shortcodes/assets/js/chart.min.js?ver=2.1.4 /*! * Chart.js * http://chartjs.org/ * * Copyright 2013 Nick Downie * Released under the MIT license * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md */ var Chart=function(s){function v(a,c,b){a=A((a-c.graphMin)/(c.steps*c.stepValue),1,0);return b*c.steps*a}function x(a,c,b,e){function h(){g+=f;var k=a.animation?A(d(g),null,0):1;e.clearRect(0,0,q,u);a.scaleOverlay?(b(k),c()):(c(),b(k));if(1>=g)D(h);else if("function"==typeof a.onAnimationComplete)a.onAnimationComplete()}var f=a.animation?1/A(a.animationSteps,Number.MAX_VALUE,1):1,d=B[a.animationEasing],g=a.animation?0:1;"function"!==typeof c&&(c=function(){});D(h)}function C(a,c,b,e,h,f){var d;a= Math.floor(Math.log(e-h)/Math.LN10);h=Math.floor(h/(1*Math.pow(10,a)))*Math.pow(10,a);e=Math.ceil(e/(1*Math.pow(10,a)))*Math.pow(10,a)-h;a=Math.pow(10,a);for(d=Math.round(e/a);dc;)a=dc?c:!isNaN(parseFloat(b))&& isFinite(b)&&a)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');");return c? b(c):b}var r=this,B={linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return-1*a*(a-2)},easeInOutQuad:function(a){return 1>(a/=0.5)?0.5*a*a:-0.5*(--a*(a-2)-1)},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return 1>(a/=0.5)?0.5*a*a*a:0.5*((a-=2)*a*a+2)},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return-1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return 1>(a/=0.5)? 0.5*a*a*a*a:-0.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return 1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return 1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return 1>(a/=0.5)?0.5*a*a*a*a*a:0.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return 1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return-0.5*(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return 0==a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return 1== a?1:1*(-Math.pow(2,-10*a/1)+1)},easeInOutExpo:function(a){return 0==a?0:1==a?1:1>(a/=0.5)?0.5*Math.pow(2,10*(a-1)):0.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return 1<=a?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return 1>(a/=0.5)?-0.5*(Math.sqrt(1-a*a)-1):0.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(a){var c=1.70158,b=0,e=1;if(0==a)return 0;if(1==(a/=1))return 1;b||(b=0.3);ea?-0.5*e*Math.pow(2,10* (a-=1))*Math.sin((1*a-c)*2*Math.PI/b):0.5*e*Math.pow(2,-10*(a-=1))*Math.sin((1*a-c)*2*Math.PI/b)+1},easeInBack:function(a){return 1*(a/=1)*a*(2.70158*a-1.70158)},easeOutBack:function(a){return 1*((a=a/1-1)*a*(2.70158*a+1.70158)+1)},easeInOutBack:function(a){var c=1.70158;return 1>(a/=0.5)?0.5*a*a*(((c*=1.525)+1)*a-c):0.5*((a-=2)*a*(((c*=1.525)+1)*a+c)+2)},easeInBounce:function(a){return 1-B.easeOutBounce(1-a)},easeOutBounce:function(a){return(a/=1)<1/2.75?1*7.5625*a*a:a<2/2.75?1*(7.5625*(a-=1.5/2.75)* a+0.75):a<2.5/2.75?1*(7.5625*(a-=2.25/2.75)*a+0.9375):1*(7.5625*(a-=2.625/2.75)*a+0.984375)},easeInOutBounce:function(a){return 0.5>a?0.5*B.easeInBounce(2*a):0.5*B.easeOutBounce(2*a-1)+0.5}},q=s.canvas.width,u=s.canvas.height;window.devicePixelRatio&&(s.canvas.style.width=q+"px",s.canvas.style.height=u+"px",s.canvas.height=u*window.devicePixelRatio,s.canvas.width=q*window.devicePixelRatio,s.scale(window.devicePixelRatio,window.devicePixelRatio));this.PolarArea=function(a,c){r.PolarArea.defaults={scaleOverlay:!0, scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleShowLine:!0,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animation:!0,animationSteps:100,animationEasing:"easeOutBounce", animateRotate:!0,animateScale:!1,onAnimationComplete:null};var b=c?y(r.PolarArea.defaults,c):r.PolarArea.defaults;return new G(a,b,s)};this.Radar=function(a,c){r.Radar.defaults={scaleOverlay:!1,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleShowLine:!0,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!1,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)", scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,angleShowLineOut:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:12,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,animation:!0,animationSteps:60,animationEasing:"easeOutQuart",onAnimationComplete:null};var b=c?y(r.Radar.defaults,c):r.Radar.defaults;return new H(a,b,s)};this.Pie=function(a, c){r.Pie.defaults={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animation:!0,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,onAnimationComplete:null};var b=c?y(r.Pie.defaults,c):r.Pie.defaults;return new I(a,b,s)};this.Doughnut=function(a,c){r.Doughnut.defaults={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animation:!0,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1, onAnimationComplete:null};var b=c?y(r.Doughnut.defaults,c):r.Doughnut.defaults;return new J(a,b,s)};this.Line=function(a,c){r.Line.defaults={scaleOverlay:!1,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,bezierCurve:!0, pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:2,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,animation:!0,animationSteps:60,animationEasing:"easeOutQuart",onAnimationComplete:null};var b=c?y(r.Line.defaults,c):r.Line.defaults;return new K(a,b,s)};this.Bar=function(a,c){r.Bar.defaults={scaleOverlay:!1,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleFontFamily:"'Arial'", scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,animation:!0,animationSteps:60,animationEasing:"easeOutQuart",onAnimationComplete:null};var b=c?y(r.Bar.defaults,c):r.Bar.defaults;return new L(a,b,s)};var G=function(a,c,b){var e,h,f,d,g,k,j,l,m;g=Math.min.apply(Math,[q,u])/2;g-=Math.max.apply(Math,[0.5*c.scaleFontSize,0.5*c.scaleLineWidth]); d=2*c.scaleFontSize;c.scaleShowLabelBackdrop&&(d+=2*c.scaleBackdropPaddingY,g-=1.5*c.scaleBackdropPaddingY);l=g;d=d?d:5;e=Number.MIN_VALUE;h=Number.MAX_VALUE;for(f=0;fe&&(e=a[f].value),a[f].valuel&&(l=h);g-=Math.max.apply(Math,[l,1.5*(c.pointLabelFontSize/2)]);g-=c.pointLabelFontSize;l=g=A(g,null,0);d=d?d:5;e=Number.MIN_VALUE; h=Number.MAX_VALUE;for(f=0;fe&&(e=a.datasets[f].data[m]),a.datasets[f].data[m]Math.PI?"right":"left";b.textBaseline="middle";b.fillText(a.labels[d],f,-h)}b.restore()},function(d){var e=2*Math.PI/a.datasets[0].data.length;b.save();b.translate(q/2,u/2);for(var g=0;gt?e:t;q/a.labels.lengthe&&(e=a.datasets[f].data[l]),a.datasets[f].data[l]d?h:d;d+=10}r=q-d-t;m=Math.floor(r/(a.labels.length-1));n=q-t/2-r;p=g+c.scaleFontSize/2;x(c,function(){b.lineWidth=c.scaleLineWidth;b.strokeStyle=c.scaleLineColor;b.beginPath();b.moveTo(q-t/2+5,p);b.lineTo(q-t/2-r-5,p);b.stroke();0t?e:t;q/a.labels.lengthe&&(e=a.datasets[f].data[l]),a.datasets[f].data[l]< h&&(h=a.datasets[f].data[l]);f=Math.floor(g/(0.66*d));d=Math.floor(0.5*(g/d));l=c.scaleShowLabels?c.scaleLabel:"";c.scaleOverride?(j={steps:c.scaleSteps,stepValue:c.scaleStepWidth,graphMin:c.scaleStartValue,labels:[]},z(l,j.labels,j.steps,c.scaleStartValue,c.scaleStepWidth)):j=C(g,f,d,e,h,l);k=Math.floor(g/j.steps);d=1;if(c.scaleShowLabels){b.font=c.scaleFontStyle+" "+c.scaleFontSize+"px "+c.scaleFontFamily;for(e=0;ed?h:d;d+=10}r=q-d-t;m= Math.floor(r/a.labels.length);s=(m-2*c.scaleGridLineWidth-2*c.barValueSpacing-(c.barDatasetSpacing*a.datasets.length-1)-(c.barStrokeWidth/2*a.datasets.length-1))/a.datasets.length;n=q-t/2-r;p=g+c.scaleFontSize/2;x(c,function(){b.lineWidth=c.scaleLineWidth;b.strokeStyle=c.scaleLineColor;b.beginPath();b.moveTo(q-t/2+5,p);b.lineTo(q-t/2-r-5,p);b.stroke();0